home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
util
/
rexx
/
sended.lha
/
SendED
next >
Wrap
Text File
|
1997-04-27
|
3KB
|
93 lines
/**************************************************/
/* Opens a C:Ed on (FinalWriter-)PublicScreen */
/* SendEd (c) 1997 by Sebastian Huebner */
/* cyco@lili.uni-bielefeld.de */
/* This Script ist EMAILWARE !! V 1.01 */
/**************************************************/
filenamefile = "ENV:SendED-File" /* store filename here */
/* CHANGE THIS TO */
/* "ENVARC:" TO SAVE */
/* PERMANENTLY */
stddrawer = "RAM:" /* fallback drawer */
stdfile = "Untitled" /* fallback filename */
windowpos = "40/30/560/170" /* window-position */
/* ADJUST TO YOUR */
/* SCREEN SIZE */
pubscreen = "FinalWriterPubScreen" /* public screen */
DEBUGLEVEL = 0 /* no debug output */
/* ONLY AVAILABLE ON */
/* FINAL WRITER HOST */
IF (DEBUGLEVEL > 0 & UPPER(SUBSTR(ADDRESS(),1,7)) = "FINALW.") THEN
ShowMessage 1 0 '"-- Info --" "DEBUGLEVEL: ' || DEBUGLEVEL || '" "HOST: ' || ADDRESS() || '" "OK" "" ""'
drawer=SetOldDrawer()
file=SetOldFile()
IF (DEBUGLEVEL > 0 & UPPER(SUBSTR(ADDRESS(),1,7)) = "FINALW.") THEN
ShowMessage 1 0 '"-- Arguments --" "Drawer: ' || drawer || '" "File: ' || file || '" "OK" "" ""'
ADDRESS COMMAND 'Echo `Requestfile DRAWER "' || drawer || '" FILE "' || file || '" PUBSCREEN FinalWriterPubScreen` >' filenamefile
filename=ReadFile(filenamefile)
file=GetFile(filename)
IF (file ~= "") THEN DO
windowtit="ED: " || file
IF (DEBUGLEVEL > 0 & UPPER(SUBSTR(ADDRESS(),1,7)) = "FINALW.") THEN
ShowMessage 1 0 '"-- Info --" "WindowTitle:" ">> ' || windowtit || ' <<" "OK" "" ""'
ADDRESS COMMAND "Run C:Ed WINDOW ""CON:" || windowpos || "/" || windowtit || "/SCREEN" || pubscreen || "/CLOSE"" " || filename
END
EXIT
/*--- Funktionen ---*/
GetPath:
PARSE ARG pathfile
pos=LASTPOS("/",pathfile)
IF (pos > 0) THEN
RETURN(SUBSTR(pathfile,1,pos))
pos=LASTPOS(":",pathfile)
IF (pos > 0) THEN
RETURN(SUBSTR(pathfile,1,pos))
RETURN("")
GetFile:
PARSE ARG pathfile
pos=LASTPOS("/",pathfile)
IF (pos > 0) THEN
IF (LENGTH(pathfile) > pos) THEN
RETURN(SUBSTR(pathfile,pos+1))
ELSE
RETURN("")
pos=LASTPOS(":",pathfile)
IF (pos > 0) THEN
IF (LENGTH(pathfile) > pos) THEN
RETURN(SUBSTR(pathfile,pos+1))
ELSE
RETURN("")
RETURN(pathfile)
SetOldDrawer: /* Versucht, alten Pfad zu geben */
d=GetPath(ReadFile(filenamefile))
IF (d = "") THEN
d=stddrawer
RETURN(d)
SetOldFile: /* Versucht, altes File zu geben */
f=GetFile(ReadFile(filenamefile))
IF (f = "") THEN
f=stdfile
RETURN(f)
ReadFile: /* eine Zeile einlesen und zurueckgeben */
PARSE ARG fn
line=""
IF OPEN("infile",fn,"READ") THEN DO
line=READLN("infile")
CALL CLOSE("infile")
END
RETURN(line)